package com.bluedot.action;

import com.bluedot.dao.CustDaoImpl;
import com.bluedot.domain.Cust;
import com.opensymphony.xwork2.ActionSupport;

public class AddCustAction extends ActionSupport {
	private Cust cust;

	public Cust getCust() {
		return cust;
	}

	public void setCust(Cust cust) {
		this.cust = cust;
	}

	public String execute() throws Exception {
		CustDaoImpl cdi = new CustDaoImpl();
		if (cust == null) {
			return "input";
		}
		else{
			cdi.saveCust(cust);
			
			return SUCCESS;
		}
	}

	@Override
	public void validate() {

	}
}
